(function($) {
	$(function() {
		
		$("tr:even").addClass("even");
		
		$(".datepicker").datepicker({changeMonth: true,changeYear: true});
		
		$(".vcimg").attr("title","点击图片刷新验证码").click(function(){
			changeValidateCode(this);
		}).css("margin-right","10px");
		
		$('.left-nav a').click(function(ev) {
			$('.left-nav a.selected').removeClass('selected');
			$(this).addClass('selected');
			//ev.preventDefault();
		});
	});
})(jQuery);

v2.Field.prototype.successClass = 'success';
v2.Field.prototype.instant = true;
v2.Field.prototype.displayErrors = 1;
v2.Field.prototype.positionErrorsAbove = false;
v2.Fieldset.prototype.positionErrorsAbove = false;

// Password validator
v2.Validator.add({
name: 'password',
message: 'Please use numbers and lower and uppercase letters',
fn: function(field, value, params) {
return /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$/.test(value);
}
}); 

//获得验证码
function changeValidateCode(obj) {
	// 获取当前的时间作为参数，无具体意义
	var timenow = new Date().getTime();
	obj.src += "?d=" + timenow;
}
